{{define "Title"}}产线设置{{end}}
{{define "Content"}}

<script type=text/javascript src="/js/enterKey.js"></script>
<script type=text/javascript src="/js/tablestyle.js"></script>

<div class="container-fluid">
<form class="form-horizontal" action="/setline" method="POST">
  <fieldset>
    <legend><b>产线设置</b></legend>
    {{if .error}}<div class="alert alert-error"><b>错误: </b>{{.error | html}}</div>
    {{else }}
      {{if .flash}}<div class="alert alert-success"><b>提示: </b>{{.flash | html}}</div>{{end}}
    {{end}}
    <div class="control-group">
      <label class="control-label">产线&nbsp;</label>
      <div class="control">
        <input type="text" class="input-large" id="prodline" name="prodline" style="background-color: #FFFFD0;" onkeydown="clicka();" maxlength="20"> <b style="color: red">*</b>
      </div>
    </div>
    <div class="control-group">
      <label class="control-label">描述&nbsp;</label>
      <div class="control">
        <input type="text" class="input-large" id="desc" name="desc" maxlength="50">
      </div>
    </div>
    <div class="form-actions">
      <button type="submit" class="btn btn-primary">产线设置</button>
    </div>
  </fieldset>
</form>
</div>

{{if .lines}}
<div class="content-box">
  <div class="content-box-header">
    <p style="font-size: 16px;">&nbsp;&nbsp;<b>产线明细</b></p>
  </div>
  <div class="content-box-content">
    <table id="tbl_ls" border="1" cellspacing="0" cellpadding="0">
      <thead>
        <tr>
          <th>产线</th>
          <th>描述</th>
          <th>是否锁定</th>
        </tr>  
      </thead>
      
      <tbody>
        {{range .lines}}
        {{$curls := .}}
        <tr>
          <td fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px" width="160">{{.Name | html}}</td>
          <td fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px" width="370">{{.Desc | html}}</td>
          <td fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px" align="center" width="60">{{.Locked | html}}</td>
        </tr>
        {{end}}
      </tbody>            
    </table>
  </div>
</div>
{{end}}
  
{{end}}